//
// Copyright (C) 2011 Steve Channell steve.channell@cepheis.com
//
// This file is part of Cephei.QL, an open-source library wrapper 
// arround QuantLib http://quantlib.org/
//
// Cephei.QL is open source software: you can redistribute it and/or modify it
// under the terms of the license.  You should have received a
// copy of the license along with this program; if not, please email
// <support@cepheis.com>. The license is also available online at
// <http://cepheis.com/license.htm>.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.  See the license for more details.
//
// Version 2.101
//#include "stdafx.h"
#include "StochasticProcess1D.h"
using namespace Cephei::QL;
#include <gen/QL/Math/Array.h>
#include <gen/QL/StochasticProcess.h>
using namespace Cephei::QL::Math;
#define HANDLE
#define ABSTRACT
#undef STRUCT
Cephei::QL::CStochasticProcess1D::CStochasticProcess1D (boost::shared_ptr<QuantLib::StochasticProcess1D>& childNative, Object^ owner) : CStochasticProcess(CStochasticProcess1D::typeid)
{
#ifdef HANDLE
	_phStochasticProcess1D = NULL;
#endif
	_ppStochasticProcess1D = &childNative;
    _ppStochasticProcess = new boost::shared_ptr<QuantLib::StochasticProcess> (boost::dynamic_pointer_cast<QuantLib::StochasticProcess> (*_ppStochasticProcess1D));
}
Cephei::QL::CStochasticProcess1D::CStochasticProcess1D (QuantLib::StochasticProcess1D& childNative, Object^ owner) : CStochasticProcess(CStochasticProcess1D::typeid)
{
#ifdef HANDLE
	_phStochasticProcess1D = NULL;
#endif
	_ppStochasticProcess1D = new boost::shared_ptr<QuantLib::StochasticProcess1D> (&childNative);
    _ppStochasticProcess = new boost::shared_ptr<QuantLib::StochasticProcess> (boost::dynamic_pointer_cast<QuantLib::StochasticProcess> (*_ppStochasticProcess1D));
    _StochasticProcess1DOwner = owner;
    _StochasticProcessOwner = owner;
}

Cephei::QL::CStochasticProcess1D::CStochasticProcess1D (CStochasticProcess1D^ copy) : CStochasticProcess(CStochasticProcess1D::typeid)
{
#ifdef HANDLE
	_phStochasticProcess1D = NULL;
#endif
	if (copy->HasNative() != NULL)
    {
		_ppStochasticProcess1D = new boost::shared_ptr<QuantLib::StochasticProcess1D> (copy->GetShared());
        _ppStochasticProcess = new boost::shared_ptr<QuantLib::StochasticProcess> (boost::dynamic_pointer_cast<QuantLib::StochasticProcess> (*_ppStochasticProcess1D));
    }
}
Cephei::QL::CStochasticProcess1D::CStochasticProcess1D (System::Type^ t) : CStochasticProcess(CStochasticProcess1D::typeid)
{
#ifdef HANDLE
	_phStochasticProcess1D = NULL;
#endif
	if (!t->IsSubclassOf(CStochasticProcess1D::typeid))
		throw gcnew Exception ("Invalid base-case init");
}
#ifdef HANDLE
Cephei::QL::CStochasticProcess1D::CStochasticProcess1D (QuantLib::Handle<QuantLib::StochasticProcess1D>& childNative, Object^ owner)  : CStochasticProcess(CStochasticProcess1D::typeid)
{
	_phStochasticProcess1D = &childNative;
	_ppStochasticProcess1D = &static_cast<boost::shared_ptr<QuantLib::StochasticProcess1D>>(childNative.currentLink());
    _ppStochasticProcess = new boost::shared_ptr<QuantLib::StochasticProcess> (boost::dynamic_pointer_cast<QuantLib::StochasticProcess> (*_ppStochasticProcess1D));
    _StochasticProcess1DOwner = owner;
}
Cephei::QL::CStochasticProcess1D::CStochasticProcess1D (QuantLib::Handle<QuantLib::StochasticProcess1D> childNative)  : CStochasticProcess(CStochasticProcess1D::typeid)
{
	_phStochasticProcess1D = &childNative;
	_ppStochasticProcess1D = &static_cast<boost::shared_ptr<QuantLib::StochasticProcess1D>>(childNative.currentLink());
    _ppStochasticProcess = new boost::shared_ptr<QuantLib::StochasticProcess> (boost::dynamic_pointer_cast<QuantLib::StochasticProcess> (*_ppStochasticProcess1D));
}
#endif
#ifdef STRUCT
Cephei::QL::CStochasticProcess1D::CStochasticProcess1D (QuantLib::StochasticProcess1D childNative)  : CStochasticProcess(CStochasticProcess1D::typeid)
{
#ifdef HANDLE
	_phStochasticProcess1D = NULL;
#endif
	_ppStochasticProcess1D = new boost::shared_ptr<QuantLib::StochasticProcess1D> (new QuantLib::StochasticProcess1D (childNative));
    _ppStochasticProcess = new boost::shared_ptr<QuantLib::StochasticProcess> (boost::dynamic_pointer_cast<QuantLib::StochasticProcess> (*_ppStochasticProcess1D));
}
#endif

Cephei::QL::CStochasticProcess1D::~CStochasticProcess1D ()
{
    if (_ppStochasticProcess1D != NULL)
    {
	    delete _ppStochasticProcess1D;
        _ppStochasticProcess1D = NULL;
    }
}
Cephei::QL::CStochasticProcess1D::!CStochasticProcess1D ()
{
    if (_ppStochasticProcess1D != NULL)
    {
	    delete _ppStochasticProcess1D;
    }
}
QuantLib::StochasticProcess1D& Cephei::QL::CStochasticProcess1D::GetReference ()
{
    if (_ppStochasticProcess1D == NULL) throw gcnew NativeNullException ();
	return **_ppStochasticProcess1D;
}
boost::shared_ptr<QuantLib::StochasticProcess1D>& Cephei::QL::CStochasticProcess1D::GetShared ()
{
    if (_ppStochasticProcess1D == NULL) throw gcnew NativeNullException ();
	return *_ppStochasticProcess1D;
}
QuantLib::StochasticProcess1D* Cephei::QL::CStochasticProcess1D::GetPointer ()
{
    if (_ppStochasticProcess1D == NULL) throw gcnew NativeNullException ();
	return &**_ppStochasticProcess1D;
}
#ifdef HANDLE
QuantLib::Handle<QuantLib::StochasticProcess1D>& Cephei::QL::CStochasticProcess1D::GetHandle ()
{
	if (_phStochasticProcess1D == NULL)
	{
		_phStochasticProcess1D = new Handle<QuantLib::StochasticProcess1D> (*_ppStochasticProcess1D);
	}
	return *_phStochasticProcess1D;
}
#endif
bool Cephei::QL::CStochasticProcess1D::HasNative () 
{
	return (_ppStochasticProcess1D != NULL);
}

Double Cephei::QL::CStochasticProcess1D::Apply (Double x0, Double dx)
{
    try
    {
        QuantLib::Real _x0 = (QuantLib::Real)ValueHelper::Convert (x0);
        QuantLib::Real _dx = (QuantLib::Real)ValueHelper::Convert (dx);
    	QuantLib::Real _rv = (QuantLib::Real)(*_ppStochasticProcess1D)->apply ( _x0,  _dx );   
        Double _nrv = (Double)ValueHelper::Convert (_rv);
    	return _nrv;
	}
    catch (QuantLib::Error& _error)
    {
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown quantlib error"));
        
    }
	catch (std::exception& _error)
	{
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown std::exception"));
	}
    finally
    {
    }
}
Double Cephei::QL::CStochasticProcess1D::Diffusion (Double t, Double x)
{
    try
    {
        QuantLib::Time _t = (QuantLib::Time)ValueHelper::Convert (t);
        QuantLib::Real _x = (QuantLib::Real)ValueHelper::Convert (x);
    	QuantLib::Real _rv = (QuantLib::Real)(*_ppStochasticProcess1D)->diffusion ( _t,  _x );   
        Double _nrv = (Double)ValueHelper::Convert (_rv);
    	return _nrv;
	}
    catch (QuantLib::Error& _error)
    {
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown quantlib error"));
        
    }
	catch (std::exception& _error)
	{
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown std::exception"));
	}
    finally
    {
    }
}
Double Cephei::QL::CStochasticProcess1D::Drift (Double t, Double x)
{
    try
    {
        QuantLib::Time _t = (QuantLib::Time)ValueHelper::Convert (t);
        QuantLib::Real _x = (QuantLib::Real)ValueHelper::Convert (x);
    	QuantLib::Real _rv = (QuantLib::Real)(*_ppStochasticProcess1D)->drift ( _t,  _x );   
        Double _nrv = (Double)ValueHelper::Convert (_rv);
    	return _nrv;
	}
    catch (QuantLib::Error& _error)
    {
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown quantlib error"));
        
    }
	catch (std::exception& _error)
	{
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown std::exception"));
	}
    finally
    {
    }
}
Double Cephei::QL::CStochasticProcess1D::Evolve (Double t0, Double x0, Double dt, Double dw)
{
    try
    {
        QuantLib::Time _t0 = (QuantLib::Time)ValueHelper::Convert (t0);
        QuantLib::Real _x0 = (QuantLib::Real)ValueHelper::Convert (x0);
        QuantLib::Time _dt = (QuantLib::Time)ValueHelper::Convert (dt);
        QuantLib::Real _dw = (QuantLib::Real)ValueHelper::Convert (dw);
    	QuantLib::Real _rv = (QuantLib::Real)(*_ppStochasticProcess1D)->evolve ( _t0,  _x0,  _dt,  _dw );   
        Double _nrv = (Double)ValueHelper::Convert (_rv);
    	return _nrv;
	}
    catch (QuantLib::Error& _error)
    {
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown quantlib error"));
        
    }
	catch (std::exception& _error)
	{
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown std::exception"));
	}
    finally
    {
    }
}
Double Cephei::QL::CStochasticProcess1D::Expectation (Double t0, Double x0, Double dt)
{
    try
    {
        QuantLib::Time _t0 = (QuantLib::Time)ValueHelper::Convert (t0);
        QuantLib::Real _x0 = (QuantLib::Real)ValueHelper::Convert (x0);
        QuantLib::Time _dt = (QuantLib::Time)ValueHelper::Convert (dt);
    	QuantLib::Real _rv = (QuantLib::Real)(*_ppStochasticProcess1D)->expectation ( _t0,  _x0,  _dt );   
        Double _nrv = (Double)ValueHelper::Convert (_rv);
    	return _nrv;
	}
    catch (QuantLib::Error& _error)
    {
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown quantlib error"));
        
    }
	catch (std::exception& _error)
	{
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown std::exception"));
	}
    finally
    {
    }
}
Double Cephei::QL::CStochasticProcess1D::StdDeviation (Double t0, Double x0, Double dt)
{
    try
    {
        QuantLib::Time _t0 = (QuantLib::Time)ValueHelper::Convert (t0);
        QuantLib::Real _x0 = (QuantLib::Real)ValueHelper::Convert (x0);
        QuantLib::Time _dt = (QuantLib::Time)ValueHelper::Convert (dt);
    	QuantLib::Real _rv = (QuantLib::Real)(*_ppStochasticProcess1D)->stdDeviation ( _t0,  _x0,  _dt );   
        Double _nrv = (Double)ValueHelper::Convert (_rv);
    	return _nrv;
	}
    catch (QuantLib::Error& _error)
    {
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown quantlib error"));
        
    }
	catch (std::exception& _error)
	{
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown std::exception"));
	}
    finally
    {
    }
}
Double Cephei::QL::CStochasticProcess1D::Variance (Double t0, Double x0, Double dt)
{
    try
    {
        QuantLib::Time _t0 = (QuantLib::Time)ValueHelper::Convert (t0);
        QuantLib::Real _x0 = (QuantLib::Real)ValueHelper::Convert (x0);
        QuantLib::Time _dt = (QuantLib::Time)ValueHelper::Convert (dt);
    	QuantLib::Real _rv = (QuantLib::Real)(*_ppStochasticProcess1D)->variance ( _t0,  _x0,  _dt );   
        Double _nrv = (Double)ValueHelper::Convert (_rv);
    	return _nrv;
	}
    catch (QuantLib::Error& _error)
    {
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown quantlib error"));
        
    }
	catch (std::exception& _error)
	{
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown std::exception"));
	}
    finally
    {
    }
}
Double Cephei::QL::CStochasticProcess1D::X0::get ()
{
    try
    {
    	QuantLib::Real _rv = (QuantLib::Real)(*_ppStochasticProcess1D)->x0 ( );   
        Double _nrv = (Double)ValueHelper::Convert (_rv);
    	return _nrv;
	}
    catch (QuantLib::Error& _error)
    {
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown quantlib error"));
        
    }
	catch (std::exception& _error)
	{
        if (_error.what())
		    throw gcnew NativeExcpetion (gcnew System::String(_error.what()));
        else
		    throw gcnew NativeExcpetion (gcnew System::String("Unknown std::exception"));
	}
    finally
    {
    }
}
Cephei::QL::CStochasticProcess1DVector::CStochasticProcess1DVector ()
{
#ifdef STRUCT
	_pVValue = NULL;
#endif
	_pVBoost = NULL;
#ifdef HANDLE
	_pVHand = NULL;
#endif
}
Cephei::QL::CStochasticProcess1DVector::~CStochasticProcess1DVector ()
{
#ifdef STRUCT
	if (_pVValue != NULL) delete _pVValue;
	_pVValue = NULL;
#endif   
	if (_pVBoost != NULL) delete _pVBoost;
	_pVBoost = NULL;
#ifdef HANDLE
	if (_pVHand != NULL) delete _pVHand;
	_pVHand = NULL;
#endif
}
Cephei::QL::CStochasticProcess1DVector::!CStochasticProcess1DVector ()
{
#ifdef STRUCT
	if (_pVValue != NULL) delete _pVValue;
#endif   
	if (_pVBoost != NULL) delete _pVBoost;
#ifdef HANDLE
	if (_pVHand != NULL) delete _pVHand;
#endif
}
#ifdef STRUCT
Cephei::QL::CStochasticProcess1DVector::CStochasticProcess1DVector (std::vector<QuantLib::StochasticProcess1D>& vec, Object^ owner)
{
#ifdef STRUCT
	_pVValue = NULL;
#endif
	_pVBoost = NULL;
#ifdef HANDLE
	_pVHand = NULL;
#endif
	_pVValue = &vec;
	_owner = owner;
}
Cephei::QL::CStochasticProcess1DVector::CStochasticProcess1DVector (std::vector<QuantLib::StochasticProcess1D> vec)
{
#ifdef STRUCT
	_pVValue = NULL;
#endif
	_pVBoost = NULL;
#ifdef HANDLE
	_pVHand = NULL;
#endif
	_pVValue = new std::vector<QuantLib::StochasticProcess1D> (vec);
}
#endif
Cephei::QL::CStochasticProcess1DVector::CStochasticProcess1DVector (std::vector<boost::shared_ptr<QuantLib::StochasticProcess1D>>& vec, Object^ owner)
{
#ifdef STRUCT
	_pVValue = NULL;
#endif
	_pVBoost = NULL;
#ifdef HANDLE
	_pVHand = NULL;
#endif
	 _pVBoost = &vec;
	_owner = owner;
}
#ifdef HANDLE
Cephei::QL::CStochasticProcess1DVector::CStochasticProcess1DVector (std::vector<QuantLib::Handle<QuantLib::StochasticProcess1D>>& vec, Object^ owner)
{
#ifdef STRUCT
	_pVValue = NULL;
#endif
	_pVBoost = NULL;
#ifdef HANDLE
	_pVHand = NULL;
#endif
	 _pVHand = &vec;
	_owner = owner;
}
#endif

int Cephei::QL::CStochasticProcess1DVector::Count::get ()
{
#ifdef STRUCT
	if (_pVValue != NULL) 
	{
		return _pVValue->size();
	}
#endif    
	if (_pVBoost != NULL)
	{
		return _pVBoost->size ();
	}
#ifdef HANDLE
	if (_pVHand != NULL)
	{
		return _pVHand->size ();
	}
#endif
	return 0;		// should never happen
}
Cephei::QL::IStochasticProcess1D^ Cephei::QL::CStochasticProcess1DVector::default::get (int index) 
{
#ifdef STRUCT
	if (_pVValue != NULL) 
	{
    	if ((size_t)index >= _pVValue->size()) throw gcnew RangeException ();
		QuantLib::StochasticProcess1D& native = (*_pVValue)[index];
		return gcnew CStochasticProcess1D (native, this);
	}
#endif    
	if (_pVBoost != NULL)
	{
    	if ((size_t)index >= _pVBoost->size()) throw gcnew RangeException ();
		QuantLib::StochasticProcess1D& native = *(*_pVBoost)[index];
		return gcnew CStochasticProcess1D (native, this);
	}
#ifdef HANDLE
	if (_pVHand != NULL)
	{
    	if ((size_t)index >= _pVHand->size()) throw gcnew RangeException ();
		QuantLib::StochasticProcess1D& native = *((*_pVHand)[index].currentLink ());
		return gcnew CStochasticProcess1D (native, this);
	}
#endif
	return nullptr;		// can never be the case
}
void Cephei::QL::CStochasticProcess1DVector::default::set (int index, Cephei::QL::IStochasticProcess1D^ value) 
{
#ifdef STRUCT
	if (_pVValue != NULL)
	{
		if (_pVValue->size() <= (size_t)index)
		{
			// can't happen because vectors are filled from List<> sequentially
			if (_pVValue->size() < (size_t)index)
			{
				throw gcnew RangeException ();
			}
			_pVValue->push_back (dynamic_cast<CStochasticProcess1D^>(value)->GetReference ());
		}
        else
        {
            QuantLib::StochasticProcess1D& c = (*_pVValue)[index];
            c = dynamic_cast<CStochasticProcess1D^>(value)->GetReference ();
        }
	}
#endif   
	if (_pVBoost != NULL)
	{
		if (_pVBoost->size() <= (size_t)index)
		{
			// can't happen because vectors are filled from List<> sequentially
			if (_pVBoost->size() < (size_t)index)
			{
				throw gcnew RangeException ();
			}
			_pVBoost->push_back (dynamic_cast<CStochasticProcess1D^>(value)->GetShared ());
		}
		boost::shared_ptr<QuantLib::StochasticProcess1D>& c = (*_pVBoost)[index];
		c = dynamic_cast<CStochasticProcess1D^>(value)->GetShared ();
	}
#ifdef HANDLE
	if (_pVHand != NULL)
	{
		if (_pVHand->size() <= (size_t)index)
		{
			// can't happen because vectors are filled from List<> sequentially
			if (_pVHand->size() < (size_t)index)
			{
				throw gcnew RangeException ();
			}
			_pVHand->push_back (QuantLib::Handle<QuantLib::StochasticProcess1D> ());
		}
		QuantLib::Handle<QuantLib::StochasticProcess1D>& c = (*_pVHand)[index];
		boost::shared_ptr<QuantLib::StochasticProcess1D>& b = static_cast<boost::shared_ptr<QuantLib::StochasticProcess1D>>(c.currentLink());
		b = dynamic_cast<CStochasticProcess1D^>(value)->GetShared ();
	}
#endif
}
Cephei::Generic::ICell<Cephei::QL::IStochasticProcess1D^>^ Cephei::QL::CStochasticProcess1DVector::CItem::get (int index) 
{
	return CellBuilder::Instance->Create<IStochasticProcess1D^> (dynamic_cast<IStochasticProcess1D^>(default[index]));
}

void Cephei::QL::CStochasticProcess1DVector::CItem::set (int index, Cephei::Generic::ICell<Cephei::QL::IStochasticProcess1D^>^ value) 
{
	default[index] = safe_cast<IStochasticProcess1D^>(value->Value);
}
#ifdef STRUCT
std::vector<QuantLib::StochasticProcess1D>& Cephei::QL::CStochasticProcess1DVector::GetReference ()
{
	 return *_pVValue;
}
#endif

std::vector<boost::shared_ptr<QuantLib::StochasticProcess1D>>& Cephei::QL::CStochasticProcess1DVector::GetShared ()
{
	return *_pVBoost;
}

#ifdef HANDLE
std::vector<QuantLib::Handle<QuantLib::StochasticProcess1D>>& Cephei::QL::CStochasticProcess1DVector::GetHandle ()
{
	return *_pVHand;
}
#endif
bool Cephei::QL::CStochasticProcess1DVector::PrepareFeature (NativeFeature feature)
{
	switch (feature)
	{
#ifdef STRUCT
		case NativeFeature::Value :
			if (_pVValue == NULL)
			{
				_pVValue = new std::vector<QuantLib::StochasticProcess1D> ();
				return true;
			}
			break;
#endif
        case NativeFeature::shared_ptr :
			if (_pVBoost == NULL)
			{
				_pVBoost = new std::vector<boost::shared_ptr<QuantLib::StochasticProcess1D>> ();
				return true;
			}
			break;
#ifdef HANDLE
        case NativeFeature::Handle :
            if (_pVHand == NULL)
            {
                _pVHand = new std::vector<QuantLib::Handle<QuantLib::StochasticProcess1D>> ();
                return true;
            }
            break;
#endif
	}
	return false;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Factory class

/* <summary>Create a single dimension array of StochasticProcess1D that can be passed into other function </summary> */
IVector<Cephei::QL::IStochasticProcess1D^>^ Cephei::QL::CStochasticProcess1D_Factory::CreateVector ()
 {
	 return gcnew CoVector<IStochasticProcess1D^> (gcnew CStochasticProcess1DVector ());
 }
IVector<Cephei::QL::IStochasticProcess1D^>^ Cephei::QL::CStochasticProcess1D_Factory::CreateVector (System::Collections::Generic::IEnumerable<IStochasticProcess1D^>^ source)
 {
	 return gcnew CoVector<IStochasticProcess1D^> (source, gcnew CStochasticProcess1DVector ());
 }
/* <summary>Create a single dimension array of StochasticProcess1D with change events</summary> */
Cephei::Generic::ICell<IVector<Cephei::Generic::ICell<Cephei::QL::IStochasticProcess1D^>^>^>^ Cephei::QL::CStochasticProcess1D_Factory::CreateCellVector ()
 {
	 return CellBuilder::Instance->Create<IVector<Cephei::Generic::ICell<Cephei::QL::IStochasticProcess1D^>^>^> (gcnew CoCellVector<Cephei::Generic::ICell<Cephei::QL::IStochasticProcess1D^>^> (gcnew CStochasticProcess1DVector ()));
 }
Cephei::Generic::ICell<IVector<Cephei::Generic::ICell<Cephei::QL::IStochasticProcess1D^>^>^>^ Cephei::QL::CStochasticProcess1D_Factory::CreateCellVector (System::Collections::Generic::IEnumerable<Cephei::Generic::ICell<Cephei::QL::IStochasticProcess1D^>^>^ source)
 {
	 return CellBuilder::Instance->Create<IVector<Cephei::Generic::ICell<Cephei::QL::IStochasticProcess1D^>^>^> (gcnew CoCellVector<Cephei::Generic::ICell<Cephei::QL::IStochasticProcess1D^>^> (source, gcnew CStochasticProcess1DVector ()));
 }

